using System;
using NewsTableAdapters;

public partial class NewsBlock : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        News.newsDataTable newsTable = new News.newsDataTable();
        newsTableAdapter newsAdapter = new newsTableAdapter();
        newsAdapter.Fill(newsTable);

        foreach (News.newsRow row in newsTable.Rows)
        {
            row[newsTable.captionColumn] = Utils.WrapString(row[newsTable.captionColumn].ToString(), 50);
        }

        newsRepeater.DataSource = newsTable;
        newsRepeater.DataBind();
        
    }
}
